import {configureStore} from "@reduxjs/toolkit";
import counterReducer from "./modules/counterStore.js";
import channelsReducer from "./modules/channelStore.js";

// 导入子模块reducer---->counterStore.js
// 创建根store组合子模块
const store= configureStore({
    reducer:{
        /*记住，下面的counter这个名字（不是counterReducer）,与后面React组件中使用store中的数据时用到
          的useSelector钩子函数中state=>state.counter中一样*/
        counter:counterReducer,
        channel:channelsReducer
    }
})
export default store;